<?php
/**
* 회원로그인 로직 처리
* /contents/member/login.php
* 2011-10-31
* btslove <btslove@nextez.co.kr>
*/
// check logic include
if (!isset($is_logic_include)) include_once  dirname(__FILE__) . '/../../common/inc.header.php';

// 실행로직 설정
$App->set_logic(__FILE__);

// set init
$mid = $App->nvl('mid');
$job = $App->nvl('job', 'form');

if ($job == 'form')
{

	$tpl = '/member/download_form.htm';
}
else if ($job == 'ok')
{
	if (!$App->check_method(POST)) $Error->fail(NO_PERMIT_METHOD);

	$App->class_require('Download');
	$App->class_require('Table.DownloadHistory');
	$Download = new Download("/Web/AMNote/SetupFiles/");
	$DownloadHistory = new DownloadHistory(&$Db);

	if($_POST['company_name'] && $_POST['name'] && $_POST['tel'])
	{
		$DownloadHistory->insert($_POST,array('ctime'));
	}


	$Download->set_path("D:\Data\Web\AMNote\SetupFiles\setup.exe");
	$Download->set_name("setup.exe");
	$Download->load();
	
}

// check logic include
if (!isset($is_logic_include))	require_once $App->_dir_root . '/common/inc.footer.php';
?>